package com.meituan.catering.management.order.biz.model.request;

import com.meituan.catering.management.order.api.http.model.enumeration.CateringOrderStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.LinkedList;
import java.util.List;

import static java.lang.Boolean.FALSE;

/**
 * @author Believe
 * Date 2022/5/27 9:55
 */
@Data
public class SearchCateringOrderBizRequest {

    private Integer pageIndex = 1;

    private Integer pageSize = 10;

    private Condition condition = new Condition();

    @Data
    public static class Condition {

        private CateringOrderStatusEnum status;

        private String tableNo;

        private Integer customerCount;

        private TotalPriceRange totalPrice = new TotalPriceRange();

    }

    private List<SortField> sortFields = new LinkedList<>();

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SortField {

        private String field;

        private String asc;
    }

    @Data
    public static class TotalPriceRange {

        private BigDecimal from;

        private BigDecimal to;

    }
}
